import Vue from 'vue';
import VueRouter from 'vue-router'
import Recommend from '../components/music-主页/music-/music-a推荐音乐';
import search from '../components/music-主页/music-/music-搜索';
import hotsong from '../components/music-主页/music-/music-热门歌单';
import music from '../components/music-主页'
import player from '../components/music-播放器'
import SearchSuggest from '../components/music-主页/music-/music-搜索/music-search/search-suggest'
import SearchList from '../components/music-主页/music-/music-搜索/music-search/search-list'
import SearchHot from '../components/music-主页/music-/music-搜索/music-search/search-hot'
import details from '../components/music-播放详情'


Vue.use(VueRouter);

const routes = [
  {
    path:'/',
    component: music,
    children: [
          {
            path:'/recommend',
            component:Recommend,
          },
          {
            path:'/hotsong',
            component:hotsong,
          },
          {
            path:'/search',
            component:search,
            redirect:'/search/SearchHot',
            children :[
                {
                  path:'SearchSuggest',
                  component:SearchSuggest,
                  name:'SearchSuggest'
                },
                {
                  path:'SearchList',
                  component:SearchList,
                  name:'SearchList'
                },
                {
                  path:'SearchHot',
                  component:SearchHot,
                  name:'SearchHot'
                }
            ]
          },
    ]
  },
  {
    path:'/player',
    component: player,
  },
  {
    path:'/playlist/track/all',
    component:details,
    name:'id'
  }
];
export default  new VueRouter({
  routes,
})